# coding: utf-8
# 18-11-16 下午5:02
RESPONSE = ['code', 'message']


def get_error_info(error):
    return dict(zip(RESPONSE, error))


UNKNOWN_ERROR = (5000, '未知错误')


# userauth
WECHAT_AUTH_ERROR = (6000, '微信登陆错误')
WECHAT_AUTH_TIMEOUT_ERROR = (6001, '微信登陆超时')
WECHAT_AUTH_BIND_ERROR = (6002, '微信绑定失败')

MOBILEPHONE_ERROR = (6100, '手机号错误')
MOBILEPHONE_TIMEOUT_ERROR = (6101, '手机号验证码超时')

CODE_INVALID_ERROR = (6102, '验证码错误')
CODE_SEND_ERROR = (6103, '验证码发送')

EMAIL_ERROR = (6200, '邮箱错误')
EMAIL_PASSWORD_ERROR = (6201, '邮箱或者错误')
SIMPLE_PASSWORD_ERROR = (6202, '密码过于简单')

QQ_AUTH_ERROR = (6300, 'QQ登陆错误')

# admin
ADMIN_EXIST_ERROR = (7000, 'email相同的管理员存在')